package com.atguigu.gmall.all.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author ：Shine
 * @description：
 * @date ：2021/2/25 15:55
 */
@Controller
public class PassportController {

    //此控制器是表示用户在访问那些页面时，会跳转到登录页面
    @GetMapping("login.html")
    public String login(HttpServletRequest request) {
        //从控制器中获取到originUrl，再将其返回给前端页面
        String originUrl = request.getParameter("originUrl");

        request.setAttribute("originUrl", originUrl);
        return "login";
    }

}
